<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 * Created on 2012-7-7
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */

?>
<div id="left">

			<?php if(common::_get_segment(1)=='category'):?>
				<div id="info">
					正在查看: <?php $categoryname = common::_get_categoryname_by_alias(common::_get_segment(2));echo $categoryname[0]->categoryname;?> 分类下的文章
					（第 <?php echo  common::_get_segment(3)? common::_get_segment(3):1?> 页 / 共 <?php echo $num_rows;?> 篇）
				</div>
			<?php endif;?>
			<?php if(common::_get_segment(1)=='author'):?>
				<div id="info">
					正在查看: <?php echo common::_get_segment(2)?> 所写的文章
					（第 <?php $page = is_numeric(common::_get_segment(3))? common::_get_segment(3):common::_get_segment(4); echo $page!=false ? $page : 1;?> 页 / 共 <?php echo $num_rows;?> 篇）
				</div>
			<?php endif;?>
    		 <div Class="post">
    		 <!-- 文章列表-->
				<?php foreach($articles as $article):?>
					<div class='articles'>
	    				<h3><strong><?php echo anchor(site_url()."/article/$article->id",$article->title)?></strong></h3>

	    				<h4 class="metadata">
							<span>发布于: <?php echo $article->publish_date?></span>
							<span>分类: <?php echo common::_get_category_name($article->category_tree,"/category/")?></span>
							<span class="no-border">作者: <?php echo anchor(site_url()."/author/$article->username",$article->username)?></span>

						</h4>
						<div class="content">
							<?php echo $article->content?>
						</div>
					</div>
				<?php endforeach;?>


					<div class="related">
						<h4><strong>相关日志:</strong></h4>
							<ul>
								sdfsf
							</ul>
					</div>
					<?php
						if($pageinfo){
							echo "<di id='pageinfo'>".$pageinfo."</div>";
						}
					?>
					<div class="tags">
						<?php if(!empty($post->tags)):?>
							<h4><strong>标签:</strong> <?php echo Common::format_metas($post->tags, ',');?></h4>
						<?php endif;?>
					</div>
				</div>

</div>
